package com.borrowed.book.membercard.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 
 * @TableName s_member_card
 */
public class SMemberCard implements Serializable {
    /**
     * 主键ID
     */
    @TableId(type= IdType.AUTO)
    private Long id;
    /**
     * 会员名称
     */
    @ApiModelProperty(value ="会员名称",dataType = "String",example = "年度会员")
    private String cardName;
    /**
     * 默认图片
     */
    @ApiModelProperty(value ="默认图片地址",dataType = "String",example = "/usr/image.jpg")
    private String cardImage;
    /**
     * 会员卡原价
     */
    @ApiModelProperty(value ="会员卡原价",dataType = "BigDecimal",example = "199")
    private BigDecimal cardPriceOrignal;
    /**
     * 会员卡价格
     */
    @ApiModelProperty(value ="会员卡现价",dataType = "BigDecimal",example = "99")
    private BigDecimal cardPrice;
    /**
     * 同时借阅次数
     */
    @ApiModelProperty(value ="同时借阅单数",dataType = "Integer",example = "3")
    private Integer borrowTimes;
    /**
     * 赠送运费券数量
     */
    @ApiModelProperty(value ="赠送运费券数",dataType = "Integer",example = "3")
    private Integer transtportCouponsNum;
    /**
     * 有效时长(周期)，表示几周，几个月
     */
    @ApiModelProperty(value ="有效时长(周期)，表示几周，几个月",dataType = "Integer",example = "3")
    private Integer validTime;
    /**
     * 有效时长单位，周，月，季，年
     */
    @ApiModelProperty(value ="有效时长单位，字典validTimeUnit",dataType = "String",example = "1")
    private String validTimeUnit;
    /**
     * 会员卡使用说明
     */
    @ApiModelProperty(value ="会员卡使用说明",dataType = "String",example = "正品保证，往返包邮，百万商品，安全消毒，不限次数")
    private String cardExplain;

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 主键ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 会员名称
     */
    public String getCardName() {
        return cardName;
    }

    /**
     * 会员名称
     */
    public void setCardName(String cardName) {
        this.cardName = cardName;
    }

    /**
     * 默认图片
     */
    public String getCardImage() {
        return cardImage;
    }

    /**
     * 默认图片
     */
    public void setCardImage(String cardImage) {
        this.cardImage = cardImage;
    }

    /**
     * 会员卡原价
     */
    public BigDecimal getCardPriceOrignal() {
        return cardPriceOrignal;
    }

    /**
     * 会员卡原价
     */
    public void setCardPriceOrignal(BigDecimal cardPriceOrignal) {
        this.cardPriceOrignal = cardPriceOrignal;
    }

    /**
     * 会员卡价格
     */
    public BigDecimal getCardPrice() {
        return cardPrice;
    }

    /**
     * 会员卡价格
     */
    public void setCardPrice(BigDecimal cardPrice) {
        this.cardPrice = cardPrice;
    }

    /**
     * 同时借阅次数
     */
    public Integer getBorrowTimes() {
        return borrowTimes;
    }

    /**
     * 同时借阅次数
     */
    public void setBorrowTimes(Integer borrowTimes) {
        this.borrowTimes = borrowTimes;
    }

    /**
     * 赠送运费券数量
     */
    public Integer getTranstportCouponsNum() {
        return transtportCouponsNum;
    }

    /**
     * 赠送运费券数量
     */
    public void setTranstportCouponsNum(Integer transtportCouponsNum) {
        this.transtportCouponsNum = transtportCouponsNum;
    }

    /**
     * 有效时长(周期)，表示几周，几个月
     */
    public Integer getValidTime() {
        return validTime;
    }

    /**
     * 有效时长(周期)，表示几周，几个月
     */
    public void setValidTime(Integer validTime) {
        this.validTime = validTime;
    }

    /**
     * 有效时长单位，周，月，季，年
     */
    public String getValidTimeUnit() {
        return validTimeUnit;
    }

    /**
     * 有效时长单位，周，月，季，年
     */
    public void setValidTimeUnit(String validTimeUnit) {
        this.validTimeUnit = validTimeUnit;
    }

    /**
     * 会员卡使用说明
     */
    public String getCardExplain() {
        return cardExplain;
    }

    /**
     * 会员卡使用说明
     */
    public void setCardExplain(String cardExplain) {
        this.cardExplain = cardExplain;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SMemberCard other = (SMemberCard) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCardName() == null ? other.getCardName() == null : this.getCardName().equals(other.getCardName()))
            && (this.getCardImage() == null ? other.getCardImage() == null : this.getCardImage().equals(other.getCardImage()))
            && (this.getCardPriceOrignal() == null ? other.getCardPriceOrignal() == null : this.getCardPriceOrignal().equals(other.getCardPriceOrignal()))
            && (this.getCardPrice() == null ? other.getCardPrice() == null : this.getCardPrice().equals(other.getCardPrice()))
            && (this.getBorrowTimes() == null ? other.getBorrowTimes() == null : this.getBorrowTimes().equals(other.getBorrowTimes()))
            && (this.getTranstportCouponsNum() == null ? other.getTranstportCouponsNum() == null : this.getTranstportCouponsNum().equals(other.getTranstportCouponsNum()))
            && (this.getValidTime() == null ? other.getValidTime() == null : this.getValidTime().equals(other.getValidTime()))
            && (this.getValidTimeUnit() == null ? other.getValidTimeUnit() == null : this.getValidTimeUnit().equals(other.getValidTimeUnit()))
            && (this.getCardExplain() == null ? other.getCardExplain() == null : this.getCardExplain().equals(other.getCardExplain()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCardName() == null) ? 0 : getCardName().hashCode());
        result = prime * result + ((getCardImage() == null) ? 0 : getCardImage().hashCode());
        result = prime * result + ((getCardPriceOrignal() == null) ? 0 : getCardPriceOrignal().hashCode());
        result = prime * result + ((getCardPrice() == null) ? 0 : getCardPrice().hashCode());
        result = prime * result + ((getBorrowTimes() == null) ? 0 : getBorrowTimes().hashCode());
        result = prime * result + ((getTranstportCouponsNum() == null) ? 0 : getTranstportCouponsNum().hashCode());
        result = prime * result + ((getValidTime() == null) ? 0 : getValidTime().hashCode());
        result = prime * result + ((getValidTimeUnit() == null) ? 0 : getValidTimeUnit().hashCode());
        result = prime * result + ((getCardExplain() == null) ? 0 : getCardExplain().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", cardName=").append(cardName);
        sb.append(", cardImage=").append(cardImage);
        sb.append(", cardPriceOrignal=").append(cardPriceOrignal);
        sb.append(", cardPrice=").append(cardPrice);
        sb.append(", borrowTimes=").append(borrowTimes);
        sb.append(", transtportCouponsNum=").append(transtportCouponsNum);
        sb.append(", validTime=").append(validTime);
        sb.append(", validTimeUnit=").append(validTimeUnit);
        sb.append(", cardExplain=").append(cardExplain);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}